import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
        path: '/',
        redirect: '/home'
      },
      {
        path: '/login',
        name: 'login',
        component: () => import('../views/login.vue')
      },
      {
        path: '/home',
        name: 'home',
        component: () => import('../views/home.vue'),
        children :[
          {
            path: '/users',
            name: 'users',
            component: () => import('../views/user/users.vue'),
          }
        ]
      }
  ]
})
